package com.etone.smartAudit.mapper;

import com.etone.smartAudit.domain.CertificateFile;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.etone.smartAudit.dto.certificate.CertificateDTO;
import com.etone.smartAudit.vo.certificate.CertificateVo;
import com.etone.smartAudit.vo.certificate.CertificateVoDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 存证单表  Mapper 接口
 * </p>
 *
 * @author jiayen
 * @since 2021-06-08
 */
@Mapper
public interface CertificateFileMapper extends BaseMapper<CertificateFile> {

    /**
     * 获取存证单列表
     * @param certificate
     * @return
     */
    List<CertificateVo> listCetificateFile(@Param("certificate") CertificateDTO certificate);

    /***
     * 根据主键获取详情
     * @param id
     * @return
     */
    CertificateVo getCetificateFileDetail(@Param("id") Integer id);

    /***
     * 获取确认单详情
     * @param groupId
     * @return
     */
    List<CertificateVoDetail> cetificateFileSureDetail(@Param("groupId") String groupId);

    /***
     * 获取最后一个版本确认单
     * @param fileId
     * @return
     */
    CertificateFile getLastVersionFile(@Param("fileId") Integer fileId);

    void compeleteById(@Param("id") Integer id);
}
